1. Field of the Invention
The present invention relates to a method, system, and program for writing files to zone formatted storage media.
2. Description of the Related Art
A hard disk drive receives input/output (I/O) commands with respect to locations on the disk. The I/O commands cause a controller that manages I/O operations for the disk to perform the requested I/O operation with respect to a target location. FIG. 1 illustrates a prior art arrangement of a recording surface of a disk 2 divided into concentric circular “tracks” on the disk surface. If there are multiple disks, then the vertical alignment of the tracks, on the disks aligned in parallel, together comprise a cylinder. The outer cylinder is shown as reference 4. Each cylinder is further divided into user data zones 6a, b, c and prerecorded servo sectors 8a-h. Data zones 6a, b, c are further divided into data sectors 9a-i. Prerecorded servo sectors 8a-h are contiguous from the inner radius to the outer radius of the formatted disk. A logical block address (“LBA”) is used to address a specific location on the stack, or within a stack of multiple disks, and is mapped by the disk controller to a cylinder or track, head number indicating a particular head in a multi-disk system, and sector. A data sector is the smallest unit that can be accessed on the disk, such as a 512 byte block identified by a LBA. FIG. 1 shows the data sectors 9a-i formatted between servo sectors 8e and 8d. Similar data sectors would be formatted between the other servo sectors. As can be seen, there are more data sectors in the outer zones than the inner zones. Prerecorded servo sectors 8a-h may actually split data sectors 9a-i as there need not be an integral number of data sectors between adjacent servo sectors. Data sectors 9a-i are aligned within their respective data zones 6a-c (FIG. 1). However, it is also possible that the data sectors do not align within their respective data zones.
The positioning time or total access time for an individual command can be broken-up into sequential phases, referred to as seek time and latency time. Seek time is the time period for the servo system to position the actuator from the current head and cylinder position to the new target head and cylinder position. The latency time represents the remaining positioning time, after seek completes, to position the head over the target sector. A “rotational time” involves the time to rotate the sector from the current sector location to position the target sector under the transducer read/write head. Thus, the total access time is determined by two time movement operations, the seek time for radial positioning and the rotational access time for circumferential positioning the head over the target sector, as well as the time to transfer the data through the head to perform the I/O operation. For files comprising multiple sectors, the access time could further include the time to move the head to another sector including file data after transferring data with respect to one sector of the file and then transfer the data through the head to the next sector.
FIG. 1 illustrates a format of a disk that is arranged into zones of consecutive tracks. Zone 6a includes the outermost tracks, zone 6b those in the middle, and zone 6c the innermost tracks. Although only three zones are shown in the illustration of FIG. 1, in actual implementations there are numerous zones as there are numerous tracks on a disk recording surface. In the prior art, data is placed on a zone according to a particular algorithm. One prior art algorithm is to start writing data to the middle zone 6b and then alternate writing data to the first available tracks in both radial directions. The goal of this prior art algorithm is to minimize the seek time the head must radially move to different tracks to access different blocks of data. Other algorithms may start from the outermost or innermost zones and then write data inward or outward, respectively, to the first available blocks or sectors.
Although the algorithm that starts writing toward the middle zone and then writes further data both outward and inward minimizes seek time, such an algorithm is not particularly optimal for retrieving data from large files where the seek time is a very small fraction of the total data transfer time.
Accordingly, there is a need in the art to improve upon the algorithm for determining a location of where to write new data to optimize the data transfer time.